home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / QuickDraw™ GX 1.1.2 / Programming Stuff / QuickDraw™ GX Interfaces & Libs / CIncludes / graphics toolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  7.2 KB  |  212 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        graphics toolbox.h
  3.  
  4.     Copyright:    © 1984-1995 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef graphicsToolboxIncludes
  13. #define graphicsToolboxIncludes
  14.  
  15.     #ifndef __WINDOWS__
  16. #include <Windows.h>
  17. /*    #include <Quickdraw.h>                                        */
  18. /*        #include <Types.h>                                        */
  19. /*            #include <ConditionalMacros.h>                        */
  20. /*            #include <MixedMode.h>                                */
  21. /*                #include <Traps.h>                                */
  22. /*        #include <QuickdrawText.h>                                */
  23. /*            #include <IntlResources.h>                            */
  24. /*    #include <Events.h>                                            */
  25. /*        #include <OSUtils.h>                                    */
  26. /*    #include <Controls.h>                                        */
  27. /*        #include <Menus.h>                                        */
  28.     #endif
  29.  
  30.     #ifndef fontTypesIncludes
  31. #include "font types.h"
  32. /*    #include "math types.h"                                        */
  33.     #endif
  34.  
  35.     #ifndef graphicsTypesIncludes
  36. #include "graphics types.h"
  37.     #endif
  38.  
  39.     #ifndef graphicsLinkageIncludes
  40. #include "graphics linkage.h"
  41.     #endif
  42.  
  43. enum gxTranslationOptions {
  44.     gxDefaultOptionsTranslation    = 0x0000,
  45.     gxOptimizedTranslation        = 0x0001,
  46.     gxReplaceLineWidthTranslation = 0x0002,
  47.     gxSimpleScalingTranslation    = 0x0004,
  48.     gxSimpleGeometryTranslation    = 0x0008,
  49.     gxSimpleLinesTranslation    = 0x000C,
  50.     gxLayoutTextTranslation        = 0x0010,
  51.     gxRasterTargetTranslation    = 0x0020,
  52.     gxPostScriptTargetTranslation = 0x0040,
  53.     gxVectorTargetTranslation    = 0x0080
  54. };
  55.  
  56. typedef long gxTranslationOption;
  57.  
  58. enum gxTranslationStatistics {
  59.     gxContainsFormsBegin        = 0x0001,
  60.     gxContainsFormsEnd            = 0x0002,
  61.     gxContainsPostScript        = 0x0004,
  62.     gxContainsEmptyPostScript    = 0x0008
  63. };
  64.  
  65. typedef long gxTranslationStatistic;
  66.  
  67. #define gxQuickDrawPictTag 0x70696374
  68.  
  69. #if defined(powerc) || defined (__powerc)
  70. #pragma options align=mac68k
  71. #endif
  72. struct gxQuickDrawPict {
  73.     gxTranslationOption            options;
  74.     Rect                        srcRect;
  75.     Point                        styleStretch;
  76.     unsigned long                dataLength;
  77.     struct gxBitmapDataSourceAlias alias;
  78. };
  79. #if defined(powerc) || defined(__powerc)
  80. #pragma options align=reset
  81. #endif
  82.  
  83.     #ifndef __cplusplus
  84. typedef struct gxQuickDrawPict gxQuickDrawPict;
  85.  
  86.     #endif
  87.  
  88. typedef OSErr (*gxShapeSpoolProcPtr)(gxShape toSpool, long refCon);
  89.  
  90. enum {
  91.     uppgxShapeSpoolProcInfo = kCStackBased
  92.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  93.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxShape)))
  94.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  95. };
  96.  
  97. #if USESROUTINEDESCRIPTORS
  98. typedef UniversalProcPtr gxShapeSpoolUPP;
  99.  
  100. #define CallgxShapeSpoolProc(userRoutine, toSpool, refCon)        \
  101.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppgxShapeSpoolProcInfo, (toSpool), (refCon))
  102. #define NewgxShapeSpoolProc(userRoutine)        \
  103.         (gxShapeSpoolUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxShapeSpoolProcInfo, GetCurrentISA())
  104. #else
  105. typedef gxShapeSpoolProcPtr gxShapeSpoolUPP;
  106.  
  107. #define CallgxShapeSpoolProc(userRoutine, toSpool, refCon)        \
  108.         (*(userRoutine))((toSpool), (refCon))
  109. #define NewgxShapeSpoolProc(userRoutine)        \
  110.         (gxShapeSpoolUPP)(userRoutine)
  111. #endif
  112.  
  113. typedef gxShapeSpoolProcPtr gxShapeSpoolFunction;
  114.  
  115. typedef void (*gxUserViewPortFilterProcPtr)(gxShape toFilter, gxViewPort portOrder, long refCon);
  116.  
  117. enum {
  118.     uppgxUserViewPortFilterProcInfo = kCStackBased
  119.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxShape)))
  120.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxViewPort)))
  121.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  122. };
  123.  
  124. #if USESROUTINEDESCRIPTORS
  125. typedef UniversalProcPtr gxUserViewPortFilterUPP;
  126.  
  127. #define CallgxUserViewPortFilterProc(userRoutine, toFilter, portOrder, refCon)        \
  128.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppgxUserViewPortFilterProcInfo, (toFilter), (portOrder), (refCon))
  129. #define NewgxUserViewPortFilterProc(userRoutine)        \
  130.         (gxUserViewPortFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxUserViewPortFilterProcInfo, GetCurrentISA())
  131. #else
  132. typedef gxUserViewPortFilterProcPtr gxUserViewPortFilterUPP;
  133.  
  134. #define CallgxUserViewPortFilterProc(userRoutine, toFilter, portOrder, refCon)        \
  135.         (*(userRoutine))((toFilter), (portOrder), (refCon))
  136. #define NewgxUserViewPortFilterProc(userRoutine)        \
  137.         (gxUserViewPortFilterUPP)(userRoutine)
  138. #endif
  139.  
  140. typedef gxUserViewPortFilterProcPtr gxUserViewPortFilter;
  141.  
  142. typedef long (*gxConvertQDFontProcPtr)(gxStyle dst, long txFont, long txFace);
  143.  
  144. enum {
  145.     uppgxConvertQDFontProcInfo = kCStackBased
  146.          | RESULT_SIZE(SIZE_CODE(sizeof(long)))
  147.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStyle)))
  148.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  149.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  150. };
  151.  
  152. #if USESROUTINEDESCRIPTORS
  153. typedef UniversalProcPtr gxConvertQDFontUPP;
  154.  
  155. #define CallgxConvertQDFontProc(userRoutine, dst, txFont, txFace)        \
  156.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppgxConvertQDFontProcInfo, (dst), (txFont), (txFace))
  157. #define NewgxConvertQDFontProc(userRoutine)        \
  158.         (gxConvertQDFontUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxConvertQDFontProcInfo, GetCurrentISA())
  159. #else
  160. typedef gxConvertQDFontProcPtr gxConvertQDFontUPP;
  161.  
  162. #define CallgxConvertQDFontProc(userRoutine, dst, txFont, txFace)        \
  163.         (*(userRoutine))((dst), (txFont), (txFace))
  164. #define NewgxConvertQDFontProc(userRoutine)        \
  165.         (gxConvertQDFontUPP)(userRoutine)
  166. #endif
  167.  
  168. typedef gxConvertQDFontProcPtr gxConvertQDFontFunction;
  169.  
  170.     #ifdef __cplusplus
  171. extern "C" {
  172.     #endif
  173.  
  174. extern gxViewPort GXNewWindowViewPort(WindowPtr qdWindow)
  175.  THREEWORDINLINE(0x303C, 0x236, 0xA832);
  176. extern gxViewPort GXGetWindowViewPort(WindowPtr qdWindow)
  177.  THREEWORDINLINE(0x303C, 0x237, 0xA832);
  178. extern WindowPtr GXGetViewPortWindow(gxViewPort portOrder)
  179.  THREEWORDINLINE(0x303C, 0x238, 0xA832);
  180. extern GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
  181.  THREEWORDINLINE(0x303C, 0x239, 0xA832);
  182. extern gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
  183.  THREEWORDINLINE(0x303C, 0x23a, 0xA832);
  184. extern void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
  185.  THREEWORDINLINE(0x303C, 0x23b, 0xA832);
  186. extern void GXGetGlobalMouse(gxPoint *globalPt)
  187.  THREEWORDINLINE(0x303C, 0x23c, 0xA832);
  188. extern void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
  189.  THREEWORDINLINE(0x303C, 0x23d, 0xA832);
  190. extern gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
  191.  THREEWORDINLINE(0x303C, 0x25e, 0xA832);
  192. extern void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon)
  193.  THREEWORDINLINE(0x303C, 0x23e, 0xA832);
  194. extern void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolFunction userFunction, void *reference)
  195.  THREEWORDINLINE(0x303C, 0x23f, 0xA832);
  196. extern gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
  197.  THREEWORDINLINE(0x303C, 0x240, 0xA832);
  198. extern gxShape GXConvertPICTToShape(const PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
  199.  THREEWORDINLINE(0x303C, 0x241, 0xA832);
  200. extern long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
  201.  THREEWORDINLINE(0x303C, 0x242, 0xA832);
  202. extern gxConvertQDFontUPP GXGetConvertQDFont(void)
  203.  THREEWORDINLINE(0x303C, 0x243, 0xA832);
  204. extern void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
  205.  THREEWORDINLINE(0x303C, 0x244, 0xA832);
  206.     #ifdef __cplusplus
  207. }
  208.     #endif
  209.  
  210. #endif
  211.  
  212.